package com.hangim.pce.common.search.domain;

import com.hangim.pce.common.domain.IdEntity;
import org.springframework.data.annotation.Id;

import java.io.Serializable;
import java.util.Objects;

public class ESIdEntity implements Serializable {
    @Id
    protected Long id;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof IdEntity)) {
            return false;
        }
        IdEntity book = (IdEntity) obj;
        return getId() != null && Objects.equals(getId(), book.getId());
    }
}
